<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="admin/_fragments::head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>博客管理登录</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
<link rel="stylesheet" href="../../static/css/me.css">
</head>
<body>
<nav th:fragment="menu(6)" class="ui inverted attached segment m-padded-tb-mini " >
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">Blog</h2>
            <a href=""  th:href="@{/}" class=" m-item item m-mobile-hidden" th:classappend="${n==1}? 'active'"><i class="home icon" ></i> 首页</a>
            <a href="" th:href="@{/types/-1}" class="m-item item m-mobile-hidden" th:classappend="${n==2}? 'active'"><i class="folder outline icon"></i> 分类</a>
            <a href="" th:href="@{/tags/-1}" class="m-item item m-mobile-hidden" th:classappend="${n==3}? 'active'"><i class="tags icon"></i> 标签</a>
            <a href="" th:href="@{/archives}" class="m-item item m-mobile-hidden" th:classappend="${n==4}? 'active'"><i class="clone icon"></i> 归档</a>
            <a href="" th:href="@{/about}" class="m-item item m-mobile-hidden" th:classappend="${n==5}? 'active'"><i class="info icon"></i> 关于我</a>
            <a href="" th:href="@{/admin}" class="m-item item m-mobile-hidden" th:classappend="${n==6}? 'active'"><i class="user plus icon"></i> 后台管理</a>
            <div class="right m-item item m-mobile-hidden">
                <form name="search" action="" th:action="@{/search}" method="post" target="_blank">
                    <div class="ui icon input">
                        <input type="text"  name="query" th:value="${query}" placeholder="亲亲在这儿搜索">
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>

            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-top-right m-mobile-show">
        <i class="sidebar icon"></i>

    </a>
</nav>
<div class="snow-container"></div>
<br>
<br>
<br>
<br>

<div class="m-container-small m-padded-tb-massive" style="max-width: 30em !important;">
    <div class="ui container">
        <div class="ui middle aligned center aligned grid">
            <div class="column">
                <h2 class="ui teal image header">

                    <div class="content">
                        后台管理登录
                    </div>
                </h2>
                <form class="ui large form" method="post" action="#" th:action="@{/admin/login}">
                    <div class="ui stacked segment">
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="user icon"></i>
                                <input type="text" name="username" placeholder="用户名">
                            </div>
                        </div>
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="lock icon"></i>
                                <input type="password" name="password" placeholder="密码">
                            </div>
                        </div>
                        <button class="ui fluid large teal submit button">登录</button>
                    </div>

                    <div class="ui error mini message">


                        </div>
                    <div class="ui mini negative message" th:unless="${#strings.isEmpty(message)}" th:text="${message}">
                        用户名和密码错误

                    </div>

                </form>


            </div>
        </div>
    </div>
</div>
<!--导航-->

<!--二级导航-->

<!--中间内容-->

<!--底部-->

<!--/*/<th:block th:replace="_fragments::script">/*/-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script src="http://www.lmlblog.com/winter/templets/xq/js/snowy.js"></script>
<script src="http://www.lmlblog.com/blog/12/js/Snow.js"></script>
<!--/*/</th:block>/*/-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script>
    $('.menu.toggle').click(function () {

        $('.m-item').toggleClass('m-mobile-hidden');}
    );
    $('.dropdown')
        .dropdown()
    ;
    $('.ui.form').form({
        fields:{
            username:{
                identifier:'username',
                rules:[{
                    type:'empty',
                    prompt:'请输入用户名'
                }]
            },
            password:{
                identifier:'password',
                rules:[{
                    type:'empty',
                    prompt:'请输入密码'
                }]
            }
        }
    })

</script>
<style type="text/css">
    .snow-container{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:100001;}
</style>
</body>
</html>